package com.dxysun.dubbo.client.springboot.controller;

import com.dxysun.dubbo.api.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dongxiyan
 * @date 2020/2/23 20:55
 */
@RestController
public class HelloController {

    @Reference
    private HelloService helloService;

    @GetMapping("/hello")
    public String hello(@RequestParam(name = "name") String name)
    {
        return helloService.sayHello(name);
    }
}
